package cn.ulc.socket.weapp.controller;

import cn.ulc.common.annotation.IgnoreAuth;
import cn.ulc.common.util.Result;
import cn.ulc.socket.weapp.model.dto.IndexDTO;
import cn.ulc.socket.weapp.service.PageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wechat/page")
public class PageController {

  @Autowired
  PageService pageService;


  @GetMapping("/index")
  public Result loadIndex() {
    IndexDTO dto = pageService.loadIndexDTO();
    return Result.success(dto);
  }
}
